package com.miaoyi.mq.consumer.filter;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        topic = "01-filter",
        consumerGroup = "my-filter-group",
        selectorType = SelectorType.TAG,
        //selectorType = SelectorType.SQL92,
        selectorExpression = "TagA" //对应标签
       // selectorExpression = "TagA || TagB " //多个
)
public class FilterConsumer implements RocketMQListener<String> {//这里泛型发送什么就接收什么
    @Override
    public void onMessage(String message) {
         System.out.println("消费消息过滤"+message);
    }
}
